//
//  ShopViewCell.m
//  BabyAndBaby
//
//  Created by 范琦 on 16/7/27.
//  Copyright © 2016年 范琦. All rights reserved.
//

#import "ShopViewCell.h"
#import "ShopModel.h"

@implementation ShopViewCell


- (void)awakeFromNib
{
    _smallView.backgroundColor = BACKGROUNDCOLOR;
    _numLabel.textColor = [UIColor colorWithRed:102/255.0 green:102/255.0 blue:102/255.0 alpha:1.0];
    _timeLabel.textColor = [UIColor colorWithRed:153/255.0 green:153/255.0 blue:153/255.0 alpha:1.0];
    _lineView.backgroundColor = [UIColor colorWithRed:222/255.0 green:222/255.0 blue:222/255.0 alpha:1.0];
    _titleLabel.textColor = TEXTCOLOR;
    _addressLabel.textColor = [UIColor colorWithRed:153/255.0 green:153/255.0 blue:153/255.0 alpha:1.0];
}

- (void)setShopModel:(ShopModel *)shopModel
{
    if ([shopModel.number isKindOfClass:[NSNumber class]]) {
        
        _numLabel.text = [shopModel.number stringValue];
    }
 
//    _timeLabel.text = shopModel.create_datetime;
    
    if ([shopModel.create_datetime isKindOfClass:[NSNumber class]]) {
        NSNumber *num = (NSNumber *)shopModel.create_datetime;
        _timeLabel.text = [num stringValue];
    }else{
        
        _timeLabel.text = shopModel.create_datetime;
    }
    
    if ([shopModel.name_merchant isKindOfClass:[NSNumber class]]) {
        NSNumber *num = (NSNumber *)shopModel.name_merchant;
        _titleLabel.text = [num stringValue];
    }else{
    
        _titleLabel.text = shopModel.name_merchant;
    }
    
    if ([shopModel.address isKindOfClass:[NSNumber class]]) {
        NSNumber *num = (NSNumber *)shopModel.address;
        _addressLabel.text = [num stringValue];
    }else{
        
        _addressLabel.text = shopModel.address;
    }
//    _addressLabel.text = shopModel.address;

}



- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
